package com.learn.aop.controller;

import com.learn.aop.locator.repository.ProxyMetaDefinitionRepository;
import com.learn.aop.model.ProxyMetaDefinition;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.actuate.endpoint.web.annotation.RestControllerEndpoint;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * @description: TODO
 * @author: Administrator
 * @createTime: 2023/12/15 0015 16:46
 * @version: 1.0
 */
@RestControllerEndpoint(id = "proxy")
@RequiredArgsConstructor
public class ProxyMetaDefinitionControllerEndPoint {


    private final ProxyMetaDefinitionRepository proxyMetaDefinitionRepository;

    @GetMapping("/listMeta")
    public List<ProxyMetaDefinition> load() {
        return proxyMetaDefinitionRepository.getProxyMetaDefinitions();
    }
}
